Programming online experiments with jsPsych

نویسنده

  • Josh de Leeuw
چکیده

This tutorial is an introduction to jsPsych, which is a free and open-source software package for creating experiments that run in a web browser. Participants in the tutorial will learn how to build an experiment using jsPsych, and how to extend and customize jsPsych for novel experimental paradigms. Running experiments online is a popular method among cognitive scientists. Data collection is (extremely) fast and cheap, and the quality of the data is generally quite high (Buhrmester, Kwang, & Gosling, 2011; Crump, McDonnell, & Gureckis, 2013; Simcox & Fiez, 2014; Zwaan & Pecher, 2012). There are methodological benefits as well, such as a more diverse subject pool (Arnett, 2008; Ross, Irani, Silberman, Zaldivar, & Tomlinson, 2010) and a reduction in possible experimenter-induced biases. Building an experiment that can be run online requires proficiency in web development techniques that many researchers lack. As a result, there is a demand for tools that make online experiments easier to develop and run. A few such tools are now available and used within the cognitive science community, including PsiTurk (McDonnell et al., 2012), QRTEngine (Barnhoorn, Haasnoot, Bocanegra, & van Steenbergen, 2014), and jsPsych (de Leeuw, 2014). The main benefit of using jsPsych is that it reduces the complexity of programming experiments for the web. Researchers using jsPsych will still need to know how to program (in JavaScript), but the programming tasks will map more naturally on to the design (rather than the implementation) of the experiment. For example, it’s not necessary to write code that will determine what key was pressed and what the response time is. jsPsych handles this, and other functionality that is common across most experiments, such as figuring out which task/trial to run next, controlling the flow of the participant through the study, storing data, and so on. However, it is necessary to describe, in code, the design of the experiment, including what kinds of tasks the subject will complete, what stimuli they will see, how long displays will last, and so on. Experiments in jsPsych are composed of individual tasks, such as showing the subject instructions, displaying a stimulus and getting a response, or filling out a survey question. These tasks are assembled, by the researcher, into a timeline. A timeline describes the tasks, the parameters for the tasks, and what order the tasks will occur. A main design feature of jsPsych is that each task is defined in its own code file, known as a plugin. Plugins have a standardized, yet extremely flexible, structure. This makes it possible to create custom plugins for tasks that are not possible with the set of plugins included in jsPsych. It is also easy to share plugins, to make replications and further manipulations of a particular task relatively easy to implement for other researchers. Information about jsPsych was presented at the 2014 Cognitive Science Society meeting as part of a larger tutorial about creating online experiments (de Leeuw et al., 2014). This tutorial will go into significantly more depth, covering more features of the library, how to develop new tasks/plugins, and demonstrating a set of new features that were added in a major update in October 2014. This update made it possible to implement a variety of different experimental designs that were previously impossible with jsPsych, including conditional branching and looping structures. Other new features from the update include the ability to easily randomize trial order, repeat sets of trials, and automatically display a progress bar. For a complete list of features, see the online documentation at http://docs.jspsych.org. The tutorial is targeted at researchers who have some familiarity and comfort with programming and an interest in developing experiments for the web. Researchers who have no programming background may find it difficult to follow along, as the basics of programming won’t be covered. The tutorial should be of interest to researchers with all levels of web-development expertise. Those who are less familiar with web-development techniques will find it easier to learn to use jsPsych than learning to create experiments from scratch, while researchers with a web-development background may find that jsPsych offers a streamlined way of building experiments that is more efficient than programming experiments on a case-by-case basis. Participants are strongly encouraged to bring a laptop with a programming-friendly text editor, such as Atom (http://www.atom.io), to follow along, but may also find it informative to just observe and learn about what is possible with jsPsych.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Online Experiments using jsPsych, psiTurk, and Amazon Mechanical Turk

This half-day tutorial will cover how to build and deploy online experiments using jsPsych, psiTurk, and Amazon Mechanical Turk (AMT). jsPsych is an open-source JavaScript library that facilitates building behavioral experiments in a web browser. psiTurk is an open-source Python platform that simplifies the process of running an experiment using AMT. Together, these two software packages reduce...

متن کامل

jsPsych: A JavaScript library for creating behavioral experiments in a Web browser

Online experiments are growing in popularity, and the increasing sophistication ofWeb technology hasmade it possible to run complex behavioral experiments online using only a Web browser. Unlike with offline laboratory experiments, however, few tools exist to aid in the development of browser-based experiments. This makes the process of creating an experiment slow and challenging, particularly ...

متن کامل

jsPsych: a JavaScript library for creating behavioral experiments in a Web browser.

Online experiments are growing in popularity, and the increasing sophistication of Web technology has made it possible to run complex behavioral experiments online using only a Web browser. Unlike with offline laboratory experiments, however, few tools exist to aid in the development of browser-based experiments. This makes the process of creating an experiment slow and challenging, particularl...

متن کامل

Dimensionality Reduction and Improving the Performance of Automatic Modulation Classification using Genetic Programming (RESEARCH NOTE)

This paper shows how we can make advantage of using genetic programming in selection of suitable features for automatic modulation recognition. Automatic modulation recognition is one of the essential components of modern receivers. In this regard, selection of suitable features may significantly affect the performance of the process. Simulations were conducted with 5db and 10db SNRs. Test and ...

متن کامل

A Heuristic Algorithm for Nonlinear Lexicography Goal Programming with an Efficient Initial Solution

In this paper,  a heuristic algorithm is proposed in order to solve a nonlinear lexicography goal programming (NLGP) by using an efficient initial point. Some numerical experiments showed that the search quality by the proposed heuristic in a multiple objectives problem depends on the initial point features, so in the proposed approach the initial point is retrieved by Data Envelopment Analysis...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015